package com.mycompany.baoming.dao;

import com.mycompany.baoming.entity.Baoming;
import com.mycompany.baoming.mapper.BaomingMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/9/1 0001.
 */
@Repository("baomingDao")
public class BaomingDaoImpl implements BaomingDao {

    @Autowired
    private BaomingMapper baomingMapper;

    @Override
    public List<Baoming> getAll() {
        return baomingMapper.getAll();
    }

    @Override
    public List<Baoming> getAllByParam(Map<String,Object> map) {
        return baomingMapper.getAllByParam(map);
    }

    @Override
    public List<Baoming> getBmList(Map<String, Object> map) {
        return baomingMapper.getAllByParam(map);
    }

    @Override
    public int addBm(Baoming bm) {
        return baomingMapper.add(bm);
    }

    @Override
    public int updateBm(Baoming bm) {
        return baomingMapper.update(bm);
    }

    @Override
    public void deleteByParam(Map<String, Object> map) {
        baomingMapper.deleteByParam(map);
    }
}
